#!/bin/bash

if [ "$1" = "purge" ];then

# echo "清理软件图标"
# rm -rf /usr/share/applications/com.github.clash-for-windows.desktop
# for i in {16,24,32,48,128,256,512}
#     do
#       if [ -f /usr/share/icons/hicolor/$i\x$i/apps/com.github.clash-for-windows.png ]
#       then
#       rm -rf /usr/share/icons/hicolor/$i\x$i/apps/com.github.clash-for-windows.png
#       fi
#     done

echo "清理用户配置文件"
for username in `ls /home`      
    do
      echo /home/$username
        if [ -d /home/$username/.config/clash ]
        then
        rm -rf /home/$username/.config/clash
        fi
        if [ -d /home/$username/.config/clash_win ]
        then
        rm -rf /home/$username/.config/clash_win
        fi
    done
else
echo "非卸载，跳过清理"
fi